using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._CartographyTools._Annotation
{
    /// <summary>
    /// <para>Annotate Selected Features</para>
    /// <para>Creates annotation for the selected features of a layer. The labeling properties defined in the annotation class properties of  the specified related annotation feature classes are used.</para>
    /// <para>为图层的选定要素创建注记。使用在指定相关注记要素类的注记类属性中定义的标注属性。</para>
    /// </summary>    
    [DisplayName("Annotate Selected Features")]
    public class AnnotateSelectedFeatures : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AnnotateSelectedFeatures()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_map">
        /// <para>Input Map</para>
        /// <para>The input map.</para>
        /// <para>输入映射。</para>
        /// </param>
        /// <param name="_in_layer">
        /// <para>Input Features</para>
        /// <para>The layer for which the selected features will have annotation created.</para>
        /// <para>将为其创建注记的所选要素的图层。</para>
        /// </param>
        /// <param name="_anno_layers">
        /// <para>Annotation Layers</para>
        /// <para>The feature-linked annotation layers and the specified sublayers that will have annotation converted into them.</para>
        /// <para>要素链接的注记图层和将进行注记转换为这些图层的指定子图层。</para>
        /// </param>
        public AnnotateSelectedFeatures(object _in_map, object _in_layer, object _anno_layers)
        {
            this._in_map = _in_map;
            this._in_layer = _in_layer;
            this._anno_layers = _anno_layers;
        }
        public override string ToolboxName => "Cartography Tools";

        public override string ToolName => "Annotate Selected Features";

        public override string CallName => "cartography.AnnotateSelectedFeatures";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_map, _in_layer, _anno_layers, _generate_unplaced.GetGPValue(), _out_anno_layers];

        /// <summary>
        /// <para>Input Map</para>
        /// <para>The input map.</para>
        /// <para>输入映射。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Map")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_map { get; set; }


        /// <summary>
        /// <para>Input Features</para>
        /// <para>The layer for which the selected features will have annotation created.</para>
        /// <para>将为其创建注记的所选要素的图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_layer { get; set; }


        /// <summary>
        /// <para>Annotation Layers</para>
        /// <para>The feature-linked annotation layers and the specified sublayers that will have annotation converted into them.</para>
        /// <para>要素链接的注记图层和将进行注记转换为这些图层的指定子图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Annotation Layers")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _anno_layers { get; set; }


        /// <summary>
        /// <para>Convert unplaced labels to unplaced annotation</para>
        /// <para><xdoc>
        ///   <para>Specifies whether to create unplaced annotation from unplaced labels.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Annotation will only be created for features that are currently labeled. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Checked—Unplaced annotation are stored in the annotation feature class. The status field for these annotation is set to Unplaced.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否从未置入的标签创建未置入的批注。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 仅为当前标注的要素创建注记。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>选中 - 未放置的注记存储在注记要素类中。这些注释的状态字段设置为“未放置”。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Convert unplaced labels to unplaced annotation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _generate_unplaced_value _generate_unplaced { get; set; } = _generate_unplaced_value._false;

        public enum _generate_unplaced_value
        {
            /// <summary>
            /// <para>GENERATE_UNPLACED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("GENERATE_UNPLACED")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>ONLY_PLACED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ONLY_PLACED")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Annotation Layers</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Annotation Layers")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public List<object> _out_anno_layers { get; set; }


        public AnnotateSelectedFeatures SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}